
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<title>丽丰集团OA办公系统</title>
<link rel="shortcut icon" type="image/x-icon" href="__PUBLIC__/images/favicon.ico"/>
<script type="text/javascript" src="__PUBLIC__/easyui/jquery.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/easyui/locale/easyui-lang-zh_CN.js"></script>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/easyui/themes/gray/easyui.css">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/easyui/themes/icon.css">
<style type="text/css">
body {
	font: 12px/20px "微软雅黑", "宋体", Arial, sans-serif, Verdana, Tahoma;
	padding: 0;
	margin: 0;
}
.layout-split-proxy-h{
	position:absolute;
	width:2px;
	background:#888;
	font-size:1px;
	cursor:e-resize;
	display:none;
	z-index:5;
}

.layout-split-north{
	border-bottom:5px solid #efefef;
}
.layout-split-south{
	border-top:5px solid #efefef;
}
.layout-split-east{
	border-left:0px solid #efefef;
}
.layout-split-west{
	border-right:0px solid #efefef;
}
a:link {
 text-decoration: none;
}
a:visited {
 text-decoration: none;
}
a:hover {
 text-decoration: underline;
}
a:active {
 text-decoration: none;
}
.cs-north {
	height:110px;
	overflow:hidden;
}

.cs-north-first{
	width: 100%;
	height: 80px;
	background: url(__PUBLIC__/images/header_bg.png) repeat-x;
}

.cs-north-bg {
	width: 100%;
	height: 100%;
}

.first-left img{
	height: 80px;
}

.first-left{
	float: left;
	width: 500px;
	height: 80px;
}

.first-right{
	float: right;
	width: 300px;
	height: 60px;
	margin-top: 10px;
}

.login-info-right{
	float: left;
	width: 70px;
	height: 60px;
}

.login-info-right img{
	width: 60px;
	border-radius: 10px;
}

.login-info-left{
	float: left;
	margin-left: 10px;
	width: 220px;
	height: 60px;
	color: white;
	font-family: '幼圆';
}

.name-info{
	margin-top: 10px;
	height:25px;
	font-size: 16px;
}

.department{
	height: 20px;
	font-size: 16px;
}

.cs-north-second{
	width: 100%;
	height: 30px;
}

.second-left{
	float: left;
	width: 500px;
	margin-top: 4px;
	margin-left: 20px;
	color: #444444;
}

.second-right{
	float: right;
	width: 250px;
	height: 30px;
	line-height: 30px;
	color: #444444;
}

.second-right img{
	right: 20px;
	width: 18px;
}

.msg-tip{
	float: left;
}

.msg-tip a{
	color: #444444;
}

.msg-tip span{
	color: #8b3e45;
}

.login-out{
	float: left;
	margin-left: 20px;
	cursor: pointer;
	height: 30px;
	line-height: 30px;
}

.cs-west {
	width:200px;
	padding:0px;

}
.cs-navi-tab {
	padding: 5px;
	text-align: center;
	width: 95%
}
.cs-tab-menu {
	width:120px;
}
.cs-home-remark {
	padding: 10px;
}
.wrapper {
    float: right;
    height: 30px;
    margin-left: 10px;
}


.cs_left {
	width: 50%;
	height: 100%;
	float: left;
}
.cs_right {
	width: 50%;
	height: 100%;
	float: left;
}
.cs-home-remark li {
	list-style: none;
	margin: 10px 10px 10px -20px;
}
.cs-home-remark .contain li {
	list-style: none;
	height: 16px;
	line-height: 12px;
	font-size: 12px;
	text-align: right;
	border-bottom: 1px solid #ccc;
}
.cs-home-remark .contain li a,.cs-home-remark a {
	color: #000;
	text-decoration: none;
}
.cs-home-remark .contain li a:hover {
	color: #999;
}
.cs-home-remark .contain .title {
	float: left;
}
.cs-home-remark .contain .author {
	margin-right: 10px;
}
.cs-home-remark .contain .time {
}
.cs-home-remark #btn {
	margin: 10px;
}
.cs-home-remark #btn .num {
	color: #FC8F36;
}
.cs-home-remark #btn_search{
	margin: 10px 0 0 200px;
}
.cs-home-remark .more {
	font-weight: bold;
	float: right;
	color: #333;
	line-height: 16px;
	margin-right: 10px;
}
.cs-home-remark .more:hover {
	color: #999;
}
.info_title{
	text-align: center;
	font-size: 20px;

}
.info_content{
	text-indent: 2em;
}
.contain1{
	padding: 20px;
}
.contain1 img{
	width: expression(this.width > 600px ? 600px : true); max-width: 600px;
}

</style>
<script type="text/javascript">
$(function(){
	document.getElementById('time').innerHTML=new Date().toLocaleString()+' 星期'+'日一二三四五六'.charAt(new Date().getDay()); 
	setInterval("document.getElementById('time').innerHTML=new Date().toLocaleString()+' 星期'+'日一二三四五六'.charAt(new Date().getDay());",1000); 

	$('.login-out').click(function(){
		$.messager.confirm('安全退出','您确认要退出OA系统吗',function(data){
			if(data){
				location.href = "__APP__/Login/loginout";
			}
			
		});
	})

});

$(function(){
	var w=$(window).width();
	var h=$(window).height();
	w=(w-$('.cs-west').width())/2-50;
	h=(h-$('.cs-north').height()+150)/2;
	$('#news').panel({   
	  width:w,
	  height:h,
	  title: '新闻',
	  iconCls:'icon-notice',   
	  collapsible:true 
	});

	$('#motto').panel({   
	  width:w,
	  height:h,
	  title: '公告',
	  iconCls:'icon-file',   
	  collapsible:true  
	});  
	$('#notice').panel({   
	  width:w,
	  height:120,
	  title: '流程管理',
	  iconCls:'icon-remind',   
	  collapsible:true   
	}); 
	$('#search').panel({   
	  width:w,
	  height:120,
	  title: '常用工具',
	  iconCls:'icon-search',   
	  collapsible:true   
	}); 



	$('#btn_search').linkbutton({   
    iconCls: 'icon-search'  
});
})





</script>
</head>
<body class="easyui-layout">
	<div region="north" border="true" class="cs-north">
		<div class="cs-north-bg">
			<div class="cs-north-first">
				<div class="first-left">
					<img src="__PUBLIC__/images/logo.png"/>
				</div>
				<volist name="employeData" id="vo">
					<div class="first-right">
						<div class="login-info-right">

							<img src="{$vo.employe_photo}"/>
						</div>
						<div class="login-info-left">
							<div class="name-info">{$vo.employe_name} — {$position}</div>
							<div class="department">{$dptName}</div>
						</div>
					</div>
				</volist>
			</div>
			<div class="cs-north-second">
				<div class="second-left"> 北京时间： <label id="time"></label> </div>
				<div class="second-right"> 
					<div class="msg-tip">
						<img src="__PUBLIC__/images/msg.png"/>
						<a href="javascript:void(0);" src="__APP__/Message/MsgList?icon=__PUBLIC__/images/newMsg.png" class="cs-navi-tab">消息</a>
						<span>({$msgCount})</span>
					</div>
					<div class="login-out">
						<img src="__PUBLIC__/images/logout.png"/> 退出系统
					</div>
				</div>
			</div>
		</div>
	</div>
	<div region="west" border="true" split="true" title="导航菜单" class="cs-west" data-options="iconCls:'icon-navigation'">
		<div class="easyui-accordion" fit="true" border="false">
				
				<div title="流程管理" data-options="iconCls:'icon-process'">
					<?php
                    	if(in_array('发起流程',$permissionList))
                    	{
                    ?>
					<a href="javascript:void(0);" src="__APP__/Process/initiateProcess" class="cs-navi-tab easyui-linkbutton" data-options="iconCls:'icon-apply'" plain="true">发起流程</a>
					<?php
						}
					?>
					<a href="javascript:void(0);" src="__APP__/Process/processList" class="cs-navi-tab easyui-linkbutton" data-options="iconCls:'icon-myapproval'" plain="true">我的申请</a>
					<a href="javascript:void(0);" src="__APP__/Process/draftApproval" class="cs-navi-tab easyui-linkbutton" data-options="iconCls:'icon-draft'" plain="true">草稿箱&nbsp;&nbsp;&nbsp;</a>
					<a href="javascript:void(0);" src="__APP__/Process/processCheckList" class="cs-navi-tab easyui-linkbutton" data-options="iconCls:'icon-approval'" plain="true">代办流程</a>
					<a href="javascript:void(0);" src="__APP__/Process/processCheckedList" class="cs-navi-tab easyui-linkbutton" data-options="iconCls:'icon-finish'" plain="true">已办流程</a>
				</div>
				<div title="个人设置" data-options="iconCls:'icon-person'">

                    <?php
                    	if(in_array('个人信息',$permissionList))
                    	{
                    ?>
					<a href="javascript:void(0);" src="__APP__/User/info" class="cs-navi-tab easyui-linkbutton" data-options="iconCls:'icon-employe'" plain="true">个人信息</a>
					<?php
						}
					?>
					<?php
                    	if(in_array('修改密码',$permissionList))
                    	{
                    ?>
					<a href="javascript:void(0);" src="__APP__/User/changePassword" class="cs-navi-tab easyui-linkbutton" data-options="iconCls:'icon-change'" plain="true">修改密码</a>
					<?php
						}
					?>
				</div>
				<div title="信息发布" data-options="iconCls:'icon-news'">
					<a href="javascript:void(0);" src="__APP__/Information/newsScan" class="cs-navi-tab easyui-linkbutton" data-options="iconCls:'icon-search-gray'" plain="true">新闻浏览</a>
					<a href="javascript:void(0);" src="__APP__/Information/adScan" class="cs-navi-tab easyui-linkbutton" data-options="iconCls:'icon-search-gray'" plain="true">公告浏览</a>
					<a href="javascript:void(0);" src="__APP__/Information/newsList" class="cs-navi-tab easyui-linkbutton" data-options="iconCls:'icon-companynews'" plain="true">新闻管理</a>
					<a href="javascript:void(0);" src="__APP__/Information/adList" class="cs-navi-tab easyui-linkbutton" data-options="iconCls:'icon-announce'" plain="true">公告管理</a>
					<a href="javascript:void(0);" src="__APP__/Information/addInfo?info_type=新闻" class="cs-navi-tab easyui-linkbutton" data-options="iconCls:'icon-apply'" plain="true">发布新闻</a>
					<a href="javascript:void(0);" src="__APP__/Information/addInfo?info_type=公告" class="cs-navi-tab easyui-linkbutton" data-options="iconCls:'icon-apply'" plain="true">发布公告</a>
				</div>
				<div title="人事管理" data-options="iconCls:'icon-user'">
					<a href="javascript:void(0);" src="__APP__/Employe/employeList" class="cs-navi-tab easyui-linkbutton" data-options="iconCls:'icon-employe'" plain="true">员工管理</a>
					<a href="javascript:void(0);" src="__APP__/Leave/leaveList" class="cs-navi-tab easyui-linkbutton" data-options="iconCls:'icon-leavelist'" plain="true">请假管理</a>
				</div>
				<div title="统计报表" data-options="iconCls:'icon-report'">
					<a href="javascript:void(0);" src="__APP__/History/leave" class="cs-navi-tab easyui-linkbutton" data-options="iconCls:'icon-leavelist'" plain="true">请假记录</a>
					<a href="javascript:void(0);" src="__APP__/History/getGoods" class="cs-navi-tab easyui-linkbutton" data-options="iconCls:'icon-leavelist'" plain="true">物品领取</a>
					<a href="javascript:void(0);" src="__APP__/History/buyGoods" class="cs-navi-tab easyui-linkbutton" data-options="iconCls:'icon-leavelist'" plain="true">物品购买</a>
					<a href="javascript:void(0);" src="__APP__/History/repair" class="cs-navi-tab easyui-linkbutton" data-options="iconCls:'icon-leavelist'" plain="true">物品维修</a>
					<a href="javascript:void(0);" src="__APP__/History/document" class="cs-navi-tab easyui-linkbutton" data-options="iconCls:'icon-leavelist'" plain="true">公文记录</a>
				</div>

				<div title="常用工具" data-options="iconCls:'icon-tool'">
					<a href="javascript:void(0);" src="__APP__/Tool/contactsList" class="cs-navi-tab easyui-linkbutton" data-options="iconCls:'icon-contactlist'" plain="true">通讯录</a>
					<a href="javascript:void(0);" src="__APP__/Tool/massage" class="cs-navi-tab easyui-linkbutton" data-options="iconCls:'icon-contacts'" plain="true">短信功能</a>
				</div>
				<div title="系统设置" data-options="iconCls:'icon-set'">
					<a href="javascript:void(0);" src="__APP__/Department/dptList" class="cs-navi-tab easyui-linkbutton" data-options="iconCls:'icon-department'" plain="true">部门管理</a>
					<a href="javascript:void(0);" src="__APP__/Position/positionList" class="cs-navi-tab easyui-linkbutton" data-options="iconCls:'icon-position'" plain="true">职位管理</a>
					<a href="javascript:void(0);" src="__APP__/Employe/userList" class="cs-navi-tab easyui-linkbutton" data-options="iconCls:'icon-users'" plain="true">用户管理</a>
					<a href="javascript:void(0);" src="__APP__/Role/role" class="cs-navi-tab easyui-linkbutton" data-options="iconCls:'icon-role'" plain="true">权限管理</a>
				</div>
		</div>
	</div>
	<div id="mainPanle" region="center" border="true" border="false">
		 <div id="tabs" class="easyui-tabs"  fit="true" border="false" >
                <div title="欢迎">
				<div class="cs-home-remark">
					
					<div class="cs_left">
						<ul>
							<li>
								<div id="news">  
								    <ul class="contain">
								    	<volist name="newsData" id="vo" offset="0" length="12">
									    	<li>
									    	    <a href="javascript:;">
										    	<span class="title">{$vo.info_title}</span>
										    	<span class="author">{$vo.info_employe_id}</span>
										    	<span class="time">{$vo.info_time|date="Y-m-d H:i:s",###}</span>
										    	<span class="content" style="display:none;">{$vo.info_content}</span>
										    	</a>
									    	</li>
								    	</volist>
								    </ul>
								    <a href="javascript:void(0);" src="__APP__/Information/newsScan" class="cs-navi-tab1"><span class="more">更多新闻＞</span></a>
								</div>
							</li>
							<li>
								<div id="notice" style="padding: 10px;">  
									<a id="btn" href="#" src="__APP__/Process/initiateProcess" class="cs-navi-tab1 easyui-linkbutton">发起流程</a>
								    <a id="btn" href="#" src="__APP__/Process/processCheckList" class="cs-navi-tab1 easyui-linkbutton">等待审批(<span class="num">{$count1}</span>)</a>
								    <a id="btn" href="#" src="__APP__/Process/processList" class="cs-navi-tab1 easyui-linkbutton">我的申请(<span class="num">{$count2}</span>)</a>
								    <a id="btn" href="#" src="__APP__/Process/draftApproval" class="cs-navi-tab1 easyui-linkbutton">草稿箱(<span class="num">{$count3}</span>)</a>
								</div>  
							</li>
							
							
						</ul>
					</div>

					<div class="cs_right">
						  
						<ul>
							<li>
								<div id="motto" style="padding: 0 10px;">  
									<ul class="contain">
										<volist name="adData" id="vo" offset="0" length="12">
									    	<li>
									    	    <a href="javascript:;">
										    	<span class="title">{$vo.info_title}</span>
										    	<span class="author">{$vo.info_employe_id}</span>
										    	<span class="time">{$vo.info_time|date="Y-m-d H:i:s",###}</span>
										    	<span class="content" style="display:none;">{$vo.info_content}</span>
										    	</a>
									    	</li>
								    	</volist>
								    </ul>
								    <a href="javascript:void(0);" src="__APP__/Information/adScan" class="cs-navi-tab1"><span class="more">更多公告＞</span></a>
								     
								</div>
							</li>
							<li>
								<div id="search" style="padding: 10px;">  
								    <a id="btn" href="#" src="__APP__/Tool/contactsList" class="cs-navi-tab1 easyui-linkbutton">通讯录</a>
								    <a id="btn" href="#" src="__APP__/User/changePassword" class="cs-navi-tab1 easyui-linkbutton" >历史任务</a>
								    <a id="btn" href="#" src="__APP__/User/info" class="cs-navi-tab1 easyui-linkbutton" >个人设置</a>
								    <a id="btn" href="#" src="__APP__/User/changePassword" class="cs-navi-tab1 easyui-linkbutton" >修改密码</a>
								</div>
							</li>
							
						</ul>
					</div>
					
				</div>
				</div>
        </div>
	</div>

	<div id="dlg" class="easyui-dialog"  style="width:800px;height:450px;"  buttons="#dlg-buttons" closed='true' title="详情内容">
		<div class="contain1">
		<p class="info_title"></p>
		<p class="info_content"></p>
		</div>
    </div>

	<div region="south" border="false" id="south"><center>www.calc100.cn</center></div>
	
	<div id="mm" class="easyui-menu cs-tab-menu">
		<div id="mm-tabupdate">刷新</div>
		<div class="menu-sep"></div>
		<div id="mm-tabclose">关闭</div>
		<div id="mm-tabcloseother">关闭其他</div>
		<div id="mm-tabcloseall">关闭全部</div>
	</div>
<script type="text/javascript">
function addTab(title, url){
	if ($('#tabs').tabs('exists', title)){
		$('#tabs').tabs('select', title);//选中并刷新
		var currTab = $('#tabs').tabs('getSelected');
		var url = $(currTab.panel('options').content).attr('src');
		if(url != undefined && currTab.panel('options').title != 'Home') {
			$('#tabs').tabs('update',{
				tab:currTab,
				options:{
					content:createFrame(url)
				}
			})
		}
	} else {
		var content = createFrame(url);
		$('#tabs').tabs('add',{
			title:title,
			content:content,
			closable:true
		});
	}
	tabClose();
}
function createFrame(url) {
	var s = '<iframe scrolling="auto" frameborder="0"  src="'+url+'" style="width:100%;height:100%;"></iframe>';
	return s;
}
		
function tabClose() {
	/*双击关闭TAB选项卡*/
	$(".tabs-inner").dblclick(function(){
		var subtitle = $(this).children(".tabs-closable").text();
		$('#tabs').tabs('close',subtitle);
	})
	/*为选项卡绑定右键*/
	$(".tabs-inner").bind('contextmenu',function(e){
		$('#mm').menu('show', {
			left: e.pageX,
			top: e.pageY
		});

		var subtitle =$(this).children(".tabs-closable").text();

		$('#mm').data("currtab",subtitle);
		$('#tabs').tabs('select',subtitle);
		return false;
	});
}		
//绑定右键菜单事件
function tabCloseEven() {
	//刷新
	$('#mm-tabupdate').click(function(){
		var currTab = $('#tabs').tabs('getSelected');
		var url = $(currTab.panel('options').content).attr('src');
		if(url != undefined && currTab.panel('options').title != 'Home') {
			$('#tabs').tabs('update',{
				tab:currTab,
				options:{
					content:createFrame(url)
				}
			})
		}
	})
	//关闭当前
	$('#mm-tabclose').click(function(){
		var currtab_title = $('#mm').data("currtab");
		$('#tabs').tabs('close',currtab_title);
	})
	//全部关闭
	$('#mm-tabcloseall').click(function(){
		$('.tabs-inner span').each(function(i,n){
			var t = $(n).text();
			if(t != 'Home') {
				$('#tabs').tabs('close',t);
			}
		});
	});
	//关闭除当前之外的TAB
	$('#mm-tabcloseother').click(function(){
		var prevall = $('.tabs-selected').prevAll();
		var nextall = $('.tabs-selected').nextAll();		
		if(prevall.length>0){
			prevall.each(function(i,n){
				var t=$('a:eq(0) span',$(n)).text();
				if(t != 'Home') {
					$('#tabs').tabs('close',t);
				}
			});
		}
		if(nextall.length>0) {
			nextall.each(function(i,n){
				var t=$('a:eq(0) span',$(n)).text();
				if(t != 'Home') {
					$('#tabs').tabs('close',t);
				}
			});
		}
		return false;
	});
	//关闭当前右侧的TAB
	$('#mm-tabcloseright').click(function(){
		var nextall = $('.tabs-selected').nextAll();
		if(nextall.length==0){
			//msgShow('系统提示','后边没有啦~~','error');
			alert('后边没有啦~~');
			return false;
		}
		nextall.each(function(i,n){
			var t=$('a:eq(0) span',$(n)).text();
			$('#tabs').tabs('close',t);
		});
		return false;
	});
	//关闭当前左侧的TAB
	$('#mm-tabcloseleft').click(function(){
		var prevall = $('.tabs-selected').prevAll();
		if(prevall.length==0){
			alert('到头了，前边没有啦~~');
			return false;
		}
		prevall.each(function(i,n){
			var t=$('a:eq(0) span',$(n)).text();
			$('#tabs').tabs('close',t);
		});
		return false;
	});

	//退出
	$("#mm-exit").click(function(){
		$('#mm').menu('hide');
	})
}

$(function() {
	tabCloseEven();


	$('.cs-navi-tab,.cs-navi-tab1').click(function() {
		var $this = $(this);
		var href = $this.attr('src');
		var title = $this.text();
		addTab(title, href);
	});

	$('.contain a').click(function(){
			var title =$(this).children('.title').text();
			var content =$(this).children('.content').html();
			$('.info_title').html(title);
			$('.info_content').html(content);
			$('#dlg').dialog(
		        {
		            closed:false
		            		            
		        }
		    );

	})

	
});

</script>
</body>
</html>